public class NvWa {
    public static void main(String[] args){
        AbstractHumanFactory yinyangLu = new HumanFactory();

        //女娲第一次造人，火候不足
        System.out.println("---白种人---");
        Human whiteHuman = yinyangLu.createHuman(WhiteHuman.class);
        whiteHuman.getColor();
        whiteHuman.talk();

        //女娲第二次造人，火候过头
        System.out.println("---黑种人---");
        Human blackHuman = yinyangLu.createHuman(BlackHuman.class);
        blackHuman.getColor();
        blackHuman.talk();


        //女娲第三次造人，火候正好
        System.out.println("---黄种人---");
        Human yellowHuman = yinyangLu.createHuman(YellowHuman.class);
        yellowHuman.getColor();
        yellowHuman.talk();
    }
}
